package com.za.wbw.dao.wap.impl;

import java.util.List;
import java.util.Map;

import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;
import com.za.wbw.model.wap.ProductInfo;

import com.za.wbw.dao.wap.ProductDao;

public class ProductDaoImpl extends SqlMapClientDaoSupport implements ProductDao{
	public List<ProductInfo> queryProductDiscountList(int shopId) throws Exception{
		return (List<ProductInfo>)getSqlMapClientTemplate().queryForList("wap.queryProductDiscountList");
	}
	public int queryProductSellCount(int shopId) throws Exception{
		return (Integer)getSqlMapClientTemplate().queryForObject("wap.queryProductSellCount");
	}
	public List<String> queryProductSellList(int shopId) throws Exception{
		return (List<String>)getSqlMapClientTemplate().queryForList("wap.queryProductSellList");
	}
	public List<ProductInfo> queryProductSellPage(Map<String, Object> pars) throws Exception{
		return (List<ProductInfo>)getSqlMapClientTemplate().queryForList("wap.queryProductSellPage");
	}
	public ProductInfo queryProductInfo(int productId) throws Exception{
		return (ProductInfo)getSqlMapClientTemplate().queryForObject("wap.queryProductInfo");
	}
}
